1. The Field of the Invention
The present invention relates generally to the field of client-server computer networking. More specifically, the invention relates to a method and apparatus for dispatching document requests in a proxy.
2. The Prior State of the Art
World Wide Web (Web) documents are commonly written in Hypertext Mark-up Language (HTML). HTML documents typically reside on Web servers and are requested by Web clients. Often, delays can be introduced during Web browsing, for example, by heavy communications traffic on the Internet or by a slow response of a remote site. Providing one or more servers for mirroring Web sites located on remote servers is one means of reducing delays involved with browsing the Web. These mirroring servers, typically referred to collectively as a xe2x80x9cproxyxe2x80x9d or individually as xe2x80x9cproxy servers,xe2x80x9d store frequently accessed Web sites in a local cache, thereby eliminating recurrent retrievals of commonly accessed documents. Thus, when a request for a particular Web page is received from a client, the proxy server associated with the particular client looks first to its local cache to service the request rather than the remote site upon which the Web page resides. If the requested document is found locally, the request can be serviced by the proxy server and a subsequent request to the remote server for the document can be avoided. Therefore, only when a valid copy of the requested document is not in the proxy""s local cache would the remote server need to be accessed. In this manner, exposure to heavy communications traffic on the Internet and slow responses of remote serves can be reduced.
While this mirroring approach is beneficial to end-users, the proxy""s cache space is inefficiently allocated in current mirroring technology. Currently, each client is assigned to one or more proxy servers. Therefore, the documents most recently requested by each active client will reside in the corresponding proxy server""s cache. Assuming one or more clients assigned to different proxy servers have requested the same document recently, the same document might be cached in several of the proxy servers, thereby reducing the cache storage space for other frequently requested documents. Further, one or more extremely popular documents might potentially be cached in each proxy server. While redundancy of information is useful for fault tolerance, organized redundancy would be preferable. Given the foregoing, what is needed is a means of more efficiently allocating cache space within a proxy. Specifically, it would be desirable to allocate mutually exclusive portions of the Web""s content to particular proxy servers.
A method is described for dispatching document requests in a proxy to more efficiently allocate the document cache space within the proxy. A proxy includes a document cache storing recently requested documents. The proxy is coupled to a client and to a remote server. The proxy implements a dispatching scheme for client requests that results in a more efficient allocation of the proxy""s document cache space. The proxy receives a document request from a client. A Uniform Resource Locator (URL) is included in the document request. The proxy forwards the request to one of a plurality of proxy servers based upon the URL.
According to another aspect of the present invention, the proxy performs a hash function on the URL that maps the URL to exactly one of the plurality of proxy servers. Advantageously, in this manner, mutually exclusive portions of the Web""s content can be allocated to particular proxy servers.